
LIBWD_DIR ?= $(CURDIR)/libwd
CFLAGS_WD = -I$(LIBWD_DIR)/libwdbase/include -I$(LIBWD_DIR)/libwdcap/include \
            -I$(LIBWD_DIR)/libwddial -Wall -I$(LIBWD_DIR)/libcjson -I$(LIBWD_DIR)/libwdplatform \
	    -I$(LIBWD_DIR)/libwdudpspeed/ -I$(LIBWD_DIR)/libwdudp/

LDFLAGS_WD = -L$(LIBWD_DIR) -lwd -pthread -lm \
			 -L$(LIBWD_DIR)/libwdudp/ -lmiss-$(DEVNAME)

ifeq ($(USE_RDKAFKA),1)
LDFLAGS_WD += $(LIBWD_DIR)/librdkafka/$(HOST)/lib/librdkafka.a  -lz -ldl
ifneq ($(OS),android)
LDFLAGS_WD += -lrt # for kafka
endif
endif 

ifeq ($(HTTPS_SUPPORT),1)
LDFLAGS_WD += $(LIBWD_DIR)/wolfssl-3.11.0/$(DEVNAME)-$(HOST)/lib/libwolfssl.a -lm
LIBwolfssl_static = $(LIBWD_DIR)/wolfssl-3.11.0/$(DEVNAME)-$(HOST)/lib/libwolfssl.a -lm
endif

LIBwdbase_static = $(LIBWD_DIR)/libwdbase/libwdbase.a
LIBghttp_static = $(LIBWD_DIR)/libghttp/libghttp.a
LIBcjson_static = $(LIBWD_DIR)/libcjson/libcjson.a
LIBwdudp_static = $(LIBWD_DIR)/libwdudp/libmiss-$(DEVNAME).a
